import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'BloC/commentBloC.dart';
import 'BloC/dynamicBloC.dart';
import 'BloC/emojiBloC.dart';
import 'view.dart';

///
/// 她的动态
///

class Dynamic extends StatelessWidget {
  const Dynamic({this.id, Key key}) : super(key: key);

  final int id; // 动态id

  @override
  Widget build(BuildContext context) {
    return MultiBlocProvider(
      providers: [
        BlocProvider<DynamicBloc>(
          create: (context) => DynamicBloc(id),
        ),
        BlocProvider<CommentBloc>(
          create: (context) => CommentBloc(id),
        ),
        BlocProvider<EmojiBloc>(
          create: (context) => EmojiBloc(),
        ),
      ],
      child: DynamicView(),
    );
  }
}
